//
//  DeviceControlPlugin.m
//  smartHome
//
//  Created by yh on 2019/3/15.
//

#import "DeviceControlPlugin.h"

@implementation DeviceControlPlugin

- (void)deiveSSIDSetup:(CDVInvokedUrlCommand *)cmd{
//    ESPConfigVC *vc = [[ESPConfigVC alloc] init];
   espConfigVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"ESPConfigVC"];
    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:espConfigVC];
    UIBarButtonItem *closeItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(close)];
    espConfigVC.navigationItem.rightBarButtonItem = closeItem;
    espConfigVC.title = @"配置网络";
    [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:nav animated:YES completion:^{
        
    }];
}

- (void)close{
    [espConfigVC dismissViewControllerAnimated:YES completion:^{
        
    }];
}

@end
